import hashlib

def set_password(pwd):
    try:
        md = hashlib.md5(pwd.encode())    # 创建md5对象
        md5pwd = md.hexdigest()           # md5加密
        return md5pwd
    except:
        return ""



